import Layout from '@/layout'
let routes = {
    path: '/system',
    component: Layout,
    name: 'system',
    meta: { title: '系统设置', icon: 'example' },
    children: [
        {
            path: 'role',
            name: 'role',
            component: () => import('@/views/system/role/index'),
            meta: { title: '角色管理', icon: 'table' }
        },
        {
            path: 'appupload',
            name: 'appupload',
            component: () => import('@/views/system/app/upload'),
            meta: { title: 'APP更新', icon: 'table',public:true }
        },
        {
            path: 'dic',
            name: 'dic',
            component: () => import('@/views/system/dic/index'),
            meta: { title: '字典表维护', icon: 'table' }
        },
        {
            path: 'area',
            name: 'area',
            component: () => import('@/views/system/area/index'),
            meta: { title: '地区管理', icon: 'table' }
        },
        {
            path: 'root',
            name: 'root',
            component: () => import('@/views/system/root/index'),
            meta: { title: '管理员账号维护', icon: 'tree' }
        },
        {
            path: 'tag',
            name: 'tag',
            component: () => import('@/views/system/tag/index'),
            meta: { title: '标签管理', icon: 'table',public:true }
        },
        {
            path: 'perms',
            name: 'perms',
            component: () => import('@/views/system/perms/index'),
            meta: { title: '权限管理', icon: 'table' ,public:true}
        },
    ]
}
// if (process.env.NODE_ENV != "development") {
//     let permsIndex = routes.children.findIndex((element) => {
//         if (element.path == "perms") {
//             return true
//         }
//         return false
//     });
//     routes.children.splice(permsIndex, 1);
// }
export default routes